package model;

import operator.BookDao;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.TreeSet;

/**
 * Created by haohao~ on 2015/12/12.
 */
public class Book {
    String name;
    String author;
    String publisher;
    Double money;
    Long id;
    String date;

    public Book(String name, String author, String publisher, Double money, Long id, String date) {
        this.name = name;
        this.author = author;
        this.publisher = publisher;
        this.money = money;
        this.id = id;
        this.date = date;
    }

    public Book() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "书名：" + this.getName() + "\t" + "作者：" + this.getAuthor() + "\t" + "出版社：" + this.getPublisher() + "\t" +
                "价格：" + this.getMoney() + "\t" + "书号：" + this.getId() + "\t" + "出版日期：" + this.getDate();
    }
}